﻿<%@ Control Language="C#" Inherits="Web.Control.WWW.Wiki.Comment" %>
<asp:Literal ID="lNCount" Text="25" runat="server" Visible="false" />
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle">
								<h1><%=GetText("WK154", new string[] { HttpUtility.HtmlEncode(Title) })%></h1>
								<div class="copyright"><a href="/knowledge/default.htm"><%=GetText("WK063")%></a> > <a href="/knowledge/learn-<%=Learn%>-<%=BaseL%>.htm"><%=GetText("C0105",new string[]{GetLanguageText(Learn)})%> <%=GetText("C2019",new string[]{GetLanguageText(BaseL)})%></a> > 
								<%if (pageType == Model.WWW_WWW.Wiki.PageType.Wiki){ %>
								<a href="/knowledge/wikilist-<%=Learn%>-<%=BaseL%>-1-[sl].htm"><%=GetText("WK053")%></a>
								<%}else{ %>
								<a href="/knowledge/contributionlist-<%=Learn%>-<%=BaseL%>-1-[sl].htm"><%=GetText("WK054")%></a>
								<%} %>
								 > <a href="/knowledge/<%=((pageType == Model.WWW_WWW.Wiki.PageType.Wiki)?"wiki":"contribution") %>-<%=Request["n"]%>.htm"><%=HttpUtility.HtmlEncode(Title)%></a></div>
							</div>
							<div class="submenuN_button" style="top:25"><%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm){%><a href="/knowledge/edit.htm" class="Naddbtn btnspec" style="text-decoration:none"><%}else{ %><a href="#" onclick="NotAffirm()" class="Naddbtn btnspec" style="text-decoration:none"><%} %><span><%=GetText("WK004")%></span></a></div>
						</div>
					</div>
				</div>
				<div class="Center9001n">
					<div class="Center9001Right">
						<div class="Center9001Content">
							<div class="knowedge_area">
								<!--content area-->
								<div class="margin20">
									<div id="MessagesBox" class="DisplayNone" style="display: none">
										<div class="MessagePanel4">
											<img id="MessageImg" src="/images/ico_info.gif" style="border-width: 0px;">
											<div id="MessageText">
											</div>
										</div>
									</div>
									<!--wall loop started-->
									<div id="divComment">
										<asp:Repeater ID="rptN" runat="server">
											<ItemTemplate>
												<div class="wiki_comment">
													<div class="wiki_comment_avatar Pic50" align="center"><a class="photo_50" href="/<%#Eval("Username") %>.htm" title="<%#HttpUtility.HtmlAttributeEncode(Eval("NickName").ToString()) %>"><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" />" : Eval("Avatar", "<img src=\"{0}\" />").ToString()%></a></div>
													<div class="wiki_comment_Bacontent">
														<div class="wiki_comment_acontent">
															<a href='/<%#Eval("Username") %>.htm'><%#HttpUtility.HtmlEncode(Eval("NickName").ToString())%></a> <span class="grey10"><%#FormatDiffDate(GetText("C0036"), Model.CommonMethod.FormatDateAgo((DateTime)Eval("DateTime")))%></span>
															<div class="margin5"><%#EncodeMessage(Eval("Body").ToString())%></div>
														</div>
														<%#DeleteFlag?Eval("ID", @"<div class='wiki_comment_delete'>
															<span onclick='DeleteComent({0},this)'><a href='javascript:void(0);'>
																<img src='/Images/icon_comment_delete.gif' border='0'></a></span></div>").ToString():"" %>
														<div class="Clear"></div>
													</div>
													<div class="Clear">
													</div>
												</div>
											</ItemTemplate>
										</asp:Repeater>
										<%if (rptN.Items.Count == 0){%>
										<span class="grey12"><%=GetText("WK005")%></span>
										<%} %>
									</div>
									<!--wall loop end-->
									<div id="divCommentPage" class="margin5">
										<%=CreatePageNav(RecordCount, int.Parse(lNCount.Text), PageIndex, 
									"",string.Format("<span class='page_none grey10'><a href='/knowledge/comment-$I$-{0}.htm'>{1}</a></span>&nbsp;",HttpUtility.UrlEncode(Request["n"]),HttpUtility.UrlEncode(GetText("Prev"))),
									"",string.Format("<span class='page_none grey10'><a href='/knowledge/comment-$I$-{0}.htm'>{1}</a></span>&nbsp;",HttpUtility.UrlEncode(Request["n"]),HttpUtility.UrlEncode(GetText("Next"))),
									string.Format("<span class='page_select'>{0}</span>&nbsp;",PageIndex),
									string.Format("<span class='page_none grey10'><a href='/knowledge/comment-$I$-{0}.htm'>$I$</a></span>&nbsp;",HttpUtility.UrlEncode(Request["n"])))%>
									</div>
									<div>
										<span class="black16b"><%=GetText("WK036", new string[] { HttpUtility.HtmlEncode(Title) })%></span>
										<p><textarea id="txtComment" rows="5" class="common450"></textarea>
										<span name="__V_S" elt1="txtComment" reg="[\s\S]{3,2000}" style="color: Red;display:none" class="validMsg"><%=GetText("ST155",new string[]{"3","2000"})%></span>
										</p>
										<p><input id="btnSave" value="<%=GetText("C0045")%>" type="button" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"javascript:if($ValidButton$())Save();\"":"onclick=\"NotAffirm()\""%> class="button" /></p>
									</div>
								</div>
								<!--content end-->
								<!--add comment-->
								<!--add comment end-->
							</div>
						</div>
					</div>
					<div class="Center9001Left">
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=GetText("WK029")%></h4>
								<div class="layer_contentA5">
									<p><img src="/Images/language_<%=Learn%>.gif" align="absmiddle" />
										<strong><%=GetText("C0105",new string[]{GetLanguageText(Learn)})%></strong><br />
										<img src="/Images/language_<%=BaseL%>.gif" align="absmiddle" />
										<strong><%=GetText("C2019",new string[]{GetLanguageText(BaseL)})%></strong></p>
									<p><strong><span id="viewCount"><%=ViewCount%></span> <%=GetText("WK097")%></strong></p>
								</div>
								<div class="margin5"><img src="/Images/icon_common_comment.gif" align="absmiddle" /> <a href="/knowledge/comment-1-<%=HttpUtility.UrlEncode(Request["n"])%>.htm"><%=GetText("C0111")%><span id="commentCount" dir="ltr">(<%=RecordCount%>)</span></a></div>
								<div class="margin5"><img src="/Images/icon_common_edit.gif" align="absmiddle" /> <a href="/knowledge/edit.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>"><%=GetText("C0053")%></a></div>
								<div class="margin5"><img src="/Images/icon_wiki_history.gif" align="absmiddle" /> <a href="/knowledge/history.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>"><%=GetText("WK031")%></a></div>
								<div class="margin5"><img src="/Images/icon_common_rss.gif" align="absmiddle" /> <a href="/knowledge/rss.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>"><%=GetText("WK032")%></a></div>
								<div class="margin5"><img src="/Images/icon_print.gif" align="absmiddle" /> <a href="/knowledge/print.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" target="_blank"><%=GetText("WK033")%></a></div>
								<div class="margin5">
									<script type="text/javascript">
				addthis_url = window.location.href;  
				addthis_title = "italki language exchange and learning community"; 
				addthis_pub = "italki.com";
				//document.getElementById("shareUrl").value = addthis_url;
									</script>
									<script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12"></script>
								</div>
							</div>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA"><img src="/Images/icon_tips.gif" align="absmiddle" /> <strong><a href="/knowledge/wiki-How+to+edit+the+italki+wiki1.htm">How do I edit italki wiki?</a></strong>
							</div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<div id="commentItem" style="display: none;">
	<div class="wiki_comment">
		<div class="wiki_comment_avatar Pic50" align="center"><a class="photo_50" href="/$UserName$.htm" title="$NickName$">$Avatar$ </a></div>
		<div class="wiki_comment_Bacontent">
			<div class="wiki_comment_acontent">
				<span class="grey10"><a href='/$UserName$.htm'>$NickName$</a> $CreateDate$ </span>
				<p>$Body$</p>
			</div>
			$DeleteTool$
			<div class="Clear"></div>
		</div>
		<div class="Clear"></div>
	</div>
</div>
<div id="DeleteTool" style="display: none;">
	<div class='wiki_comment_delete'>
		<span onclick='DeleteComent({0},this)'><a href='javascript:void(0);'>
			<img src='/Images/icon_comment_delete.gif' border='0'></a></span></div>
</div>

<script>
var m = '<%=HttpContext.Current.User.Identity.Name%>';
var gDateFormat = "<%=GetText("C0033")%>";
var gStrDate = "<%=GetText("C0034")%>";
var gDeleteFlag = <%=(DeleteFlag?"true":"false") %>;
var gPageIndex = <%=PageIndex%>;
var gLastCount = <%=rptN.Items.Count %>;
var gPageSize = <%=lNCount.Text%>;
var gPageName = '<%=Escape(Request["n"])%>';
var MessageTextS="<%=GetText("C1002")%>";
var MessageTextF="<%=GetText("C1011")%>";
var MessageImageS = "/images/ico_info.gif";
var MessageImageF = "/images/ico_info.gif";
var strHome = "";
var strPre = "<span class='page_none grey10'><a href='/knowledge/comment-$I$-<%=HttpUtility.UrlEncode(Request["n"])%>.htm'><%=HttpUtility.UrlEncode(GetText("Prev"))%></a></span>&nbsp;";
var strLast = "";
var strNext = "<span class='page_none grey10'><a href='/knowledge/comment-$I$-<%=HttpUtility.UrlEncode(Request["n"])%>.htm'><%=HttpUtility.UrlEncode(GetText("Next"))%></a></span>&nbsp;";
var strSel = "<span class='page_select'>$I$</span>&nbsp;";
var strUnSel = "<span class='page_none grey10'><a href='/knowledge/comment-$I$-<%=HttpUtility.UrlEncode(Request["n"])%>.htm'>$I$</a></span>&nbsp;";
</script>
<script type="text/javascript" src="/knowledge/Comment.js"></script>
<script type="text/javascript" src="/Scripts/Valid.js"></script>